<%@ page language="java" pageEncoding="ISO-8859-1"%>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>

<html:html locale="true">
<head>
	<title>GPS Tracker Log In</title>
	<html:base />

	<script language="javascript">
function validate(objForm){

if(objForm.username.value.length==0){
alert("Please enter UserID!");
objForm.username.focus();
return false;
}

if(objForm.password.value.length==0){
alert("Please enter Password!");
objForm.password.focus();
return false;
}

if(objForm.usertype.selectedIndex == 0 ){

alert("Please Select User Type!");
objForm.usertype.focus();
return false;
}

return true;
}
</script>
	<link rel="stylesheet" type="text/css" href="CSS/divs.css">
</head>

<body bgcolor="white">
	<div id="row1">
		<center>
			<img src="images/gpsbanner.jpg" alt="" name="Banner" width="950"
				height="100" id="Banner" />
		</center>
	</div>
	<center>
		<h2>
			Welcome to GPS Tracker
		</h2>
		<br>
		<!-- Log in form -->
		<html:form action="/login" method="post" focus="username"
			onsubmit="return validate(this);">

			<table width="400" border="1" align="center" cellpadding="0"
				cellspacing="0">
				<tr>
					<td>
						<table border="0" cellspacing="2" cellpadding="1" width="100%">
							<tr bgcolor="#eaeac8">
								<td align="left" colspan="2">
									<font size="5">User Login</font>
								</td>
							</tr>

							<tr>
								<td colspan="2" valign="middle">
									<p>
										&nbsp;
									</p>
								</td>
							</tr>

							<tr align="center">
								<td align="right">
									User ID:
								</td>
								<td>
									<html:text property="username" size="30" maxlength="30" />
								</td>
							</tr>

							<tr align="center">
								<td align="right">
									Password:
								</td>
								<td>
									<html:password property="password" size="30" maxlength="30" />
								</td>
							</tr>

							<tr>
								<td align="center" colspan="2">
									<html:submit>Login</html:submit>
								</td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
		</html:form>
	</center>
<body>
</html:html>